package com.nicho.pojo;

import java.io.Serializable;
import java.util.ArrayList;

/*
 * @Author: 姜东浩
 * @Date: 2021-11-08 17:10:16
 * @LastEditors: 姜东浩
 * @LastEditTime: 2021-11-12 14:38:08
 * @Description: 教师类
 */
public class Teacher implements Serializable {

    // 教师ID，用来登录系统
    private String teacherId;
    // 教师姓名
    private String teacherName;
    // 教师密码
    private String password;
    // 教师性别
    private String sex;
    // 教师教的科目
    private String tCourseId;
    // 教师管理的学生集合
    private ArrayList<Student> studentList = new ArrayList<Student>();

    private static final long serialVersionUID = 1L;

    public String getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(String teacherId) {
        this.teacherId = teacherId;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String gettCourseId() {
        return tCourseId;
    }

    public void settCourseId(String tCourseId) {
        this.tCourseId = tCourseId;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    public ArrayList<Student> getStudentList() {
        return studentList;
    }

    public void setStudentList(ArrayList<Student> studentList) {
        for (Student stu : studentList) {
            this.studentList.add(stu);
        }
    }

    @Override
    public String toString() {
        return "Teacher [teacherId=" + teacherId + ", teacherName=" + teacherName + ", sex=" + sex + ", password="
                + password + ", tCourseId=" + tCourseId + ", studentList=" + studentList + "]";
    }

    public String toStringC(){
        return "[ID：" + teacherId + ", 姓名：" + teacherName + "]";
    }

    public String toStringE(){
        return "[ID：" + teacherId + ", 姓名：" + teacherName + ", 性别：" + sex + ", 密码："
        + password + ", 所教课程编号：" + tCourseId + "]";
    }

    public Teacher() {
    }
    
    public Teacher(String teacherId) {
        this.teacherId = teacherId;
    }

    public Teacher(String teacherId, String password) {
        this.teacherId = teacherId;
        this.password = password;
    }

    public Teacher(String teacherId, String teacherName, String password, String sex) {
        this.teacherId = teacherId;
        this.teacherName = teacherName;
        this.password = password;
        this.sex = sex;
    }

    public Teacher(String teacherId, String teacherName, String password, String sex, String tCourseId) {
        this.teacherId = teacherId;
        this.teacherName = teacherName;
        this.password = password;
        this.tCourseId = tCourseId;
        this.sex = sex;
    }

    public Teacher(String teacherId, String teacherName, String password, String sex, String tCourseId, ArrayList<Student> studentList) {
        this.teacherId = teacherId;
        this.teacherName = teacherName;
        this.password = password;
        this.sex = sex;
        this.tCourseId = tCourseId;
        for (Student stu : studentList) {
            this.studentList.add(stu);
        }
    }

}